package mock;
import model.interfaces.Rule;




public class TwoPepsiRule implements Rule {

    private int numberOfPepsis = 0;
    
    @Override
    public void addObject(Object object) {
       if (object instanceof Pepsi) {
           numberOfPepsis++;
       }
    }

    @Override
    public boolean verify() {
        return numberOfPepsis == 2;
    }

    @Override
    public void reset() {
        numberOfPepsis = 0;        
    }
}
